package com.zhoug.widget.dialog.date;

public interface IDateChooser {
    int FLAG_DATE = 1;//0001 年月日
    int FLAG_TIME = 2;//0010 时分
    int FLAG_ALL = 3;//0011 年月日时分

    void show();

    IDateChooser setTitle(String title);

    void dismiss();

    void setCanceledOnTouchOutside(boolean canceled);

    void setCancelable(boolean canceled);

    IDateChooser setYear(String year);

    IDateChooser setMonth(String month);

    IDateChooser setDay(String day);

    IDateChooser setMaxYear(String maxYear);
    IDateChooser setMaxMonth(String maxMonth);
    IDateChooser setMaxDay(String maxDay);
    IDateChooser setMax(String maxYear, String maxMonth, String maxDay);

    /**
     *
     * @param date yyyy-MM-dd
     * @return
     */
    IDateChooser setMax(String date);

    IDateChooser setTag(Object tag);


    /**
     *
     * @param flag {@link #FLAG_TIME,#FLAG_DATE,#FLAG_ALL}
     * @return
     */
    IDateChooser setFlag(int flag);

    Object getTag();


    IDateChooser setCallback(Callback callback);

    interface Callback {
        void onChange(String year, String month, String day);
    }

    interface Callback2 extends Callback {
        void onChange(String year, String month, String day, String hour, String minute);
    }
}
